The Parametric Ellipse

Ellipse_6.png
Figure 1: Parametric form of ellipse centered at the origin with a semi-major axis length of $2$ and a semi-minor axis length of $0.5$. In elliptic form the equation is $\frac{x^{2}}{4}+\frac{y^{2}}{0.25}=1$.

In two dimensions, the easiest parametric form to understand is the one similar to a circle. It starts with a center point vector, and adds a vector for the cosine and sine. Instead of having a radius term in front of each trig function, we put the length of the semi-major and semi-minor axes. See figure 1. $$\left(\begin{array}{c} x\\ y \end{array}\right)=\left(\begin{array}{c} CP_{x}\\ CP_{y} \end{array}\right)+\left(\begin{array}{c} a\cdot cos(\theta)\\ b\cdot sin(\theta) \end{array}\right)\qquad0\le\theta\le2\pi \tag{1} \label{1}$$ Equation $\eqref{1}$ produces an axis oriented ellipse identical to $$\frac{\left(x-CP_{x}\right)^{2}}{a^{2}}+\frac{\left(y-CP_{y}\right)^{2}}{b^{2}}=1.$$ The advantage to $\eqref{1}$ is that we can rotate the ellipse about its center by merely adding two orthogonal “unit” vectors. Another advantage is that it works the same in $\mathbb{R}^{3}$. $$\left(\begin{array}{c} x\\ y \end{array}\right)=\left(\begin{array}{c} CP_{x}\\ CP_{y} \end{array}\right)+a\cdot\cos(\theta)\cdot\mathbf{u}+b\cdot\sin(\theta)\cdot\mathbf{v}\qquad0\le\theta\le2\pi \tag{2} \label{2}$$

Parametric Ellipse_1.png
Figure 2: Parametric form of ellipse centered at the origin with a semi-major axis length of $2$ and a semi-minor axis length of $0.5$. In elliptic form the equation is $\frac{x^{2}}{4}+\frac{y^{2}}{0.25}=1$.

So, for example, to rotate the ellipse to a $45^{\circ}$ angle, We would use the vectors, $\mathbf{u}=(1,1)/\Vert(1,1)\Vert$ and $\mathbf{v}=(-1,1)/\Vert(-1,1)\Vert.$ Also, something very nice about this rotation is that $a$ and $b$ continue to be the semi-axis length. Therefore, since we have basis vectors $\mathbf{u}$ and $\mathbf{v}$ we can find the vertices as $\left( \begin{array}{c}V_1\\V_2 \end{array}\right)=C_P\pm a\mathbf{u}$ and $\left( \begin{array}{c}V_3\\V_4 \end{array}\right) =C_P\pm b\mathbf{v}$.

There are many other ways to parametrize an ellipse. see Wikipedia-Ellipse

Example: Draw an ellipse that is centered at (3,0,0) and is parallel to the $yz$ plane and has its semi-major axis ending at the point $(3,2,1)$.
Answer: The length a will be $\Vert(3,0,0)-(3,2,1)\Vert$. The length $b$ is not specified so there could be an infinite number of ellipses that comply, but we will arbitrarily choose one. Let $b=a/2$. Vector $\mathbf{u}$ will be in the direction of the semi-major axis, but must have unit length. $$\mathbf{u}=\left(\frac{\left(\begin{array}{c} 3\\ 2\\ 1 \end{array}\right)-\left(\begin{array}{c} 3\\ 0\\ 0 \end{array}\right)}{\left\Vert \left(\begin{array}{c} 3\\ 2\\ 1 \end{array}\right)-\left(\begin{array}{c} 3\\ 0\\ 0 \end{array}\right)\right\Vert }\right) \tag{3} \label{3}$$ To get vector $\mathbf{v}$, since it has to be orthogonal to $\mathbf{u}$, and in the $yz$ plane, we set up the following equation, noting that the dot product of two orthogonal vectors is zero. $$\left( \begin{array}{c} 0\\ u_{y}\\ u_{z} \end{array}\right) \cdot \left( \begin{array}{c} 0\\ v_{y}\\ v_{z} \end{array}\right)=0,$$ which is $u_{y}v_{y}+u_{z}v_{z}=0$. If we let $v_{y}=1$ (arbitrary but not zero), then we can solve for $u_{z}=\frac{-u_{y}}{u_{z}}$. Since we already know the elements of $\mathbf{u,}$ $\eqref{3}$ we also now have the vector $\mathbf{v.}$ $$\mathbf{v}=\frac{\left(\begin{array}{c} 0\\ 1\\ -\frac{u_{y}}{u_{z}} \end{array}\right)}{\left\Vert \left(\begin{array}{c} 0\\ 1\\ -\frac{u_{y}}{u_{z}} \end{array}\right)\right\Vert }$$ Incidentally, this gives the same result as swapping the $y$ and $z$ elements of vector $\mathbf{u}$ and changing the sign of one of them. At this point, we have defined $C,a,b,\mathbf{u,\text{ and }\mathbf{v}}$ and are ready to write the equation. $$\left(\begin{array}{c} x\\ y\\ z \end{array}\right)=\left(\begin{array}{c} C_{x}\\ C_{y}\\ C_{z} \end{array}\right)+a\cdot\mathbf{u}\cdot cos(t)+b\cdot\mathbf{v}\cdot sin(t)\qquad 0\le t\le t 2\pi$$ Numerically, the values are $a=2.2361$, $b=1.118$, $\mathbf{u}=(0,0.8944,0.4472)$, $\mathbf{v}=(0,0.4472,-0.8944)$, and $C=(3,0,0)$.
In the grapic below, you can click and drag to better view the result.